/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package ocumed.presentation.arzt;

import javax.swing.JFrame;
import javax.swing.JTabbedPane;
import ocumed.teams.IPanBehandlung;
import ocumed.teams.teamb.application.PatientReihung;
import ocumed.teams.teamd.gui.PanUntersuchung;

/**
 *
 * @author apr3455
 */
public class BehandlungTabbedPane extends JTabbedPane implements IPanBehandlung {

    PatientReihung m_controller = new PatientReihung();
    PanUntersuchung m_panUntersuchung = null;
    
    public BehandlungTabbedPane(JFrame frame){
        m_panUntersuchung = new PanUntersuchung(frame);
    }
    
    public boolean createBehandlung(int patientId) {
        if(this.getTabCount() < 2){
            add(m_panUntersuchung, "Behandlung");
            setSelectedIndex(1);
        } else {
            setSelectedIndex(1);

        }
        
        return m_panUntersuchung.createBehandlung(patientId);
    }

    
}
